package com.bosssoft.service;

import java.io.Serializable;
import java.util.List;

import com.bosssoft.entity.dto.FibUserDTO;
import com.bosssoft.entity.po.FibUserPO;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author Li kexi
 * Created on 2021/8/16.14:32
 */
public interface FibUserService extends IService<FibUserPO>{

    /**
     * 用户注册
     * @param userDTO
     * @return
     */
    boolean register(FibUserDTO userDTO);

    /**
     * 用户登录
     * @param username
     * @param password
     * @return
     */
    FibUserDTO login(String username, String password);

    /**
     * 通过用户名获取用户信息
     * @param username
     * @return
     */
    FibUserDTO getUserByUsername(String username);

    /**
     * 通过用户名获取id主键
     * @param username
     * @return
     */
    Long getIdByUsername(String username);

    /**
     * 更新用户信息
     * @param userDTO
     * @return
     */
    boolean updateUserDetails(FibUserDTO userDTO);

    boolean banUserById(Long id, Integer status);

    boolean banUserByUsername(String username, Integer status);

    boolean deleteUserById(Long id);

    boolean deleteUserByUsername(String username);

    int updateBatch(List<FibUserPO> list);

    int updateBatchSelective(List<FibUserPO> list);

    int batchInsert(List<FibUserPO> list);

    int insertOrUpdate(FibUserPO record);

    int insertOrUpdateSelective(FibUserPO record);

    // 以下方法仅供测试使用
    List<FibUserDTO> getAllUser();
}
